<?php 
//新闻的删除
	include_once("./com.php");
	$nid=$_GET['nid'];
	$wet="select * from news where nid={$nid}";
	$frt=mysql_query($wet);
	$fde=mysql_fetch_assoc($frt);
	$nimg=explode("-",$fde['nimg']);
	$ser="delete from news where nid=$nid";
	mysql_query($ser);
	if(mysql_affected_rows()>0){
			$png="../uploads1";
			foreach ($nimg as $value) {
				unlink($png."/".$value);
			}
		echo "<script>
				alert('删除成功')
				location.href='news.php'
				</script>";
	
	}else{
		echo "<script>
				alert('删除失败')
				location.href='news.php'
				</script>";
	}



 ?>